﻿CREATE PROCEDURE [acms].[Post_GetAllBySiteIdMenuIdAndParentPath]
	@SiteId int, 
	@MenuId int,
	@ParentPath varchar(255)
AS
	SELECT *
	FROM [Post_View]
	Where SiteId = @SiteId
		and ParentPath = @ParentPath
		and Id in (Select PostId from [PostMenu] where MenuId = @MenuId and Included = 1)
	ORDER By Sequence

RETURN 0;